package com.jrzh.db.migration.sys;

import com.jrzh.framework.migration.BaseMigration;
import com.jrzh.framework.migration.MigrationHelper;
/**
 * 新增文件管理表
 * @author XiaoBin
 *
 */
public class Migration_7 extends BaseMigration{
	
	private static final String TABLE_NAME = "sys_files";
	
	@Override
	public void down() {
		log.info("##########回滚Sys模块 Migration_7##########");
		MigrationHelper.dropTable(TABLE_NAME);
	}

	@Override
	public void up() {
		log.info("##########执行Sys模块 Migration_7##########Begin");
		table(TABLE_NAME, "文件管理表", true,
				pk(),
				jrVarchar("_name", "文件名称", 128),
				jrVarchar("_type", "文件类型" , 64),
				jrVarchar("_url", "文件路径" , 512),
				jrVarchar("_model", "所属实体" , 128),
				jrChar("_form_id", "关联实体ID", 36),
				jrVarchar("_remark", "备注", 512)
		);
		log.info("##########执行Sys模块 Migration_7##########End");
	}

}
